home *** CD-ROM | disk | FTP | other *** search
/ PC World Interactive 7 / PC World Interactive 7.iso / online / motor.EXE / MOMY.PAS < prev    next >
Pascal/Delphi Source File  |  1991-10-05  |  3KB  |  105 lines

  1. begin
  2. write('ѥ');
  3. end.
  4. ,D4,D5 :FILE;
  5.    f1,f2,f3,f4,F5,F6 :text;
  6.    str2,str1   :string[11];
  7.    STR3,STR4   :STRING[10];
  8.    STR5        :STRING[4];
  9.    STR6        :STRING[6];
  10.    ST1         :STRING[80];
  11.    x1,x2,x3,x4,x5,S,i :longint;
  12.    y1,y2,y3,y4 :real;
  13.    label 10,20,30;
  14.  
  15.                begin
  16.                i:=0;
  17.               20:i:=i+1;
  18.                if (paramstr(i) = '') then goto 30;
  19.                ASSIGN(F4,'DAT');REWRITE(F4);
  20.                ASSIGN(F2,'SAT');
  21.                assign(f3,'t');rewrite(f3);
  22.                writeln(f3,paramstr(i));reset(f3);
  23.                readln(f3,s);close(f3);
  24.                assign(f1,'mom2.dat');
  25.                reset(F1);rewrite(f2);
  26.                writeln(f2,'  0');
  27.                writeln(f2,'SECTION');
  28.                WRITELN(F2,'  2');
  29.                WRITELN(F2,'ENTITIES');
  30.                WRITELN(F2,'  0');
  31.                writeln(f2,'POLYLINE');
  32.                WRITELN(F2,'  8');
  33.                WRITELN(F2,'0');
  34.                WRITELN(F2,' 66');
  35.                WRITELN(F2,'     1');
  36.                WRITELN(F2,'  0');
  37.                10:READLN(F1,X3,X4,X5);
  38.                IF NOT (X3 = S) THEN GOTO 10;
  39.                RESET(F1);
  40.                while not eof(f1) do
  41.                begin;
  42.                readln(f1,X3,x1,x2,y1,Y2);
  43.                IF (X1 = X4) THEN
  44.                BEGIN;
  45.                writeln(f2,'VERTEX');
  46.                WRITELN(F2,'  8');
  47.                WRITELN(F2,'0');
  48.                WRITELN(F2,' 10');
  49.                WRITELN(F2,X1+(Y2*100)/4);
  50.                WRITELN(F2,' 20');
  51.                WRITELN(F2,X2);
  52.                WRITELN(F2,'  0');
  53.                writeln(f4,'TEXT');
  54.                WRITELN(F4,'  8');
  55.                WRITELN(F4,'0');
  56.                WRITELN(F4,' 10');
  57.                WRITELN(F4,X1);
  58.                WRITELN(F4,' 20');
  59.                WRITELN(F4,X2);
  60.                WRITELN(F4,' 40');
  61.                WRITELN(F4,'10');
  62.                WRITELN(F4,'  1');
  63.                WRITELN(F4,ROUND(Y2*100));
  64.                WRITELN(F4,' 50');
  65.                WRITELN(F4,'90');
  66.                WRITELN(F4,'  0');
  67.                END;
  68.                END;
  69.                ASSIGN(F6,'MOMY.MNU');APPEND(F6);
  70.                WRITELN(F6,'[',PARAMSTR(I),']^C(COMMAND "DXFIN" "',PARAMSTR(I),'")');
  71.                CLOSE(F6);
  72.                WRITELN(F2,'SEQEND');
  73.                WRITELN(F2,'  8');
  74.                WRITELN(F2,'0');
  75.                WRITELN(F2,'  0');
  76.                ASSIGN(F5,PARAMSTR(i)+'.DXF');REWRITE(F5);RESET(F2);RESET(F4);
  77.                WHILE NOT EOF(F2) DO
  78.                BEGIN;
  79.                READLN(F2,ST1);WRITELN(F5,ST1);
  80.                END;
  81.                WHILE NOT EOF(F4) DO
  82.                BEGIN;
  83.                READLN(F4,ST1);WRITELN(F5,ST1);
  84.                END;
  85.                WRITELN(F5,'ENDSEC');
  86.                WRITELN(F5,'  0');
  87.                WRITELN(F5,'EOF');
  88.              CLOSE(F1);CLOSE(F2);CLOSE(F4);CLOSE(F5);
  89.              goto 20;
  90.              30:ASSIGN(D1,'SAT');ASSIGN(D2,'DAT');ASSIGN(D3,'T');
  91.              ERASE(D1);ERASE(D2);ERASE(D3);
  92.           end.
  93.  
  94.  
  95. uses crt;
  96. var
  97.    D1,D2,D3,D4,D5 :FILE;
  98.    f1,f2,f3,f4,F5,F6 :text;
  99.    str2,str1   :string[11];
  100.    STR3,STR4   :STRING[10];
  101.    STR5        :STRING[4];
  102.    STR6        :STRING[6];
  103.    ST1         :STRING[80];
  104.    x1,x2,x3,x4,x5,S,i :longint;
  105.    y1,y2,